-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New rule S2970: Assertions should be complete #6757
New rule S2970: Assertions should be complete #6757
Conversation
db9224a
to
d7be4d9
Compare
analyzers/tests/SonarAnalyzer.UnitTest/Helpers/SyntaxHelperTest.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides some nitpicking.
Was it considered to add support for FakeItEasy?
It has some assertion calls that could be checked in a very similar manner:
A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();
analyzers/tests/SonarAnalyzer.UnitTest/Rules/AssertionsShouldBeCompleteTest.cs
Show resolved
Hide resolved
...ests/SonarAnalyzer.UnitTest/TestCases/AssertionsShouldBeComplete.FluentAssertions.CSharp7.cs
Show resolved
Hide resolved
...ests/SonarAnalyzer.UnitTest/TestCases/AssertionsShouldBeComplete.FluentAssertions.CSharp7.cs
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/AssertionsShouldBeComplete.NFluent.cs
Outdated
Show resolved
Hide resolved
...ests/SonarAnalyzer.UnitTest/TestCases/AssertionsShouldBeComplete.FluentAssertions.CSharp7.cs
Show resolved
Hide resolved
No. There is also moq |
…uldBeComplete.NFluent.cs Co-authored-by: Tim Pohlmann <tim.pohlmann@sonarsource.com>
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
Fixes #6662